package com.aqiang.day0528_shop.main.presenter

import com.aqiang.day0528_shop.main.contract.GoodsTypeContract
import com.aqiang.day0528_shop.main.model.GoodsTypeModel
import com.zy.shopproject2.usercenter.entity.BaseResponseEntity
import kotlinx.coroutines.Deferred

class GoodsTypePresenter(var v:GoodsTypeContract.GoodsTypeView):GoodsTypeContract.GoodsTypePresenter(v) {
    override fun getSpikeGodds() {
        if(mView.get() != null && mView != null){
            val spikeGodds = mModel.getSpikeGodds(mView.get()!!.getStartTime())
            mView.get()!!.spike(spikeGodds)
        }
    }

    override fun getGoodsType(){
        if(mView.get() != null && mView != null){
            val goodsType = mModel.getGoodsType()
            mView.get()!!.initAdapte(goodsType)
        }
    }

    override fun initModel(): GoodsTypeContract.GoodsTypeModel {
        return GoodsTypeModel()
    }
}